home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpinstall / nsIXPIProgressDialog.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  142 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIXPIProgressDialog.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIXPIProgressDialog_h__
  6. #define __gen_nsIXPIProgressDialog_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIXPIProgressDialog */
  19. #define NS_IXPIPROGRESSDIALOG_IID_STR "ce8f744e-d5a5-41b3-911f-0fee3008b64e"
  20.  
  21. #define NS_IXPIPROGRESSDIALOG_IID \
  22.   {0xce8f744e, 0xd5a5, 0x41b3, \
  23.     { 0x91, 0x1f, 0x0f, 0xee, 0x30, 0x08, 0xb6, 0x4e }}
  24.  
  25. /**
  26.  * Interface to display XPInstall download and install status.
  27.  *
  28.  * @status UNDER_REVIEW
  29.  */
  30. class NS_NO_VTABLE nsIXPIProgressDialog : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXPIPROGRESSDIALOG_IID)
  34.  
  35.   /**
  36.      * state values for onStateChange
  37.      */
  38.   enum { DOWNLOAD_START = 0 };
  39.  
  40.   enum { DOWNLOAD_DONE = 1 };
  41.  
  42.   enum { INSTALL_START = 2 };
  43.  
  44.   enum { INSTALL_DONE = 3 };
  45.  
  46.   enum { DIALOG_CLOSE = 4 };
  47.  
  48.   /**
  49.      * basic info to control the install progress dialog. The dialog can
  50.      * go away any time after it has received the DIALOG_CLOSE state message
  51.      * but needs to accept messages until that time even if it is not visible.
  52.      *
  53.      * Normally for each install package the dialog will receive the download
  54.      * and install messages in START/DONE pairs, but in the case of a download
  55.      * error the dialog will be sent only the DOWNLOAD_START followed by an
  56.      * INSTALL_DONE message with the value nsInstall::DOWNLOAD_ERROR
  57.      *
  58.      * @param index     the package this message is about of those passed into
  59.      *                  openProgressDialog. ignored when state==DIALOG_CLOSE
  60.      * @param state     the kind of message
  61.      * @param value     final result when state==INSTALL_DONE, otherwise ignored
  62.      */
  63.   /* void onStateChange (in unsigned long index, in short state, in long value); */
  64.   NS_IMETHOD OnStateChange(PRUint32 index, PRInt16 state, PRInt32 value) = 0;
  65.  
  66.   /**
  67.      * download progress
  68.      *
  69.      * @param index     the package to which this refers
  70.      * @param value     number of bytes downloaded
  71.      * @param maxValue  the total size
  72.      */
  73.   /* void onProgress (in unsigned long index, in unsigned long long value, in unsigned long long maxValue); */
  74.   NS_IMETHOD OnProgress(PRUint32 index, PRUint64 value, PRUint64 maxValue) = 0;
  75.  
  76. };
  77.  
  78. /* Use this macro when declaring classes that implement this interface. */
  79. #define NS_DECL_NSIXPIPROGRESSDIALOG \
  80.   NS_IMETHOD OnStateChange(PRUint32 index, PRInt16 state, PRInt32 value); \
  81.   NS_IMETHOD OnProgress(PRUint32 index, PRUint64 value, PRUint64 maxValue); 
  82.  
  83. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  84. #define NS_FORWARD_NSIXPIPROGRESSDIALOG(_to) \
  85.   NS_IMETHOD OnStateChange(PRUint32 index, PRInt16 state, PRInt32 value) { return _to OnStateChange(index, state, value); } \
  86.   NS_IMETHOD OnProgress(PRUint32 index, PRUint64 value, PRUint64 maxValue) { return _to OnProgress(index, value, maxValue); } 
  87.  
  88. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  89. #define NS_FORWARD_SAFE_NSIXPIPROGRESSDIALOG(_to) \
  90.   NS_IMETHOD OnStateChange(PRUint32 index, PRInt16 state, PRInt32 value) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStateChange(index, state, value); } \
  91.   NS_IMETHOD OnProgress(PRUint32 index, PRUint64 value, PRUint64 maxValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProgress(index, value, maxValue); } 
  92.  
  93. #if 0
  94. /* Use the code below as a template for the implementation class for this interface. */
  95.  
  96. /* Header file */
  97. class nsXPIProgressDialog : public nsIXPIProgressDialog
  98. {
  99. public:
  100.   NS_DECL_ISUPPORTS
  101.   NS_DECL_NSIXPIPROGRESSDIALOG
  102.  
  103.   nsXPIProgressDialog();
  104.  
  105. private:
  106.   ~nsXPIProgressDialog();
  107.  
  108. protected:
  109.   /* additional members */
  110. };
  111.  
  112. /* Implementation file */
  113. NS_IMPL_ISUPPORTS1(nsXPIProgressDialog, nsIXPIProgressDialog)
  114.  
  115. nsXPIProgressDialog::nsXPIProgressDialog()
  116. {
  117.   /* member initializers and constructor code */
  118. }
  119.  
  120. nsXPIProgressDialog::~nsXPIProgressDialog()
  121. {
  122.   /* destructor code */
  123. }
  124.  
  125. /* void onStateChange (in unsigned long index, in short state, in long value); */
  126. NS_IMETHODIMP nsXPIProgressDialog::OnStateChange(PRUint32 index, PRInt16 state, PRInt32 value)
  127. {
  128.     return NS_ERROR_NOT_IMPLEMENTED;
  129. }
  130.  
  131. /* void onProgress (in unsigned long index, in unsigned long long value, in unsigned long long maxValue); */
  132. NS_IMETHODIMP nsXPIProgressDialog::OnProgress(PRUint32 index, PRUint64 value, PRUint64 maxValue)
  133. {
  134.     return NS_ERROR_NOT_IMPLEMENTED;
  135. }
  136.  
  137. /* End of implementation class template. */
  138. #endif
  139.  
  140.  
  141. #endif /* __gen_nsIXPIProgressDialog_h__ */
  142.